package com.xmj.billing.service.impl;

import com.xmj.billing.domain.BarberShopBillings;
import com.xmj.billing.mapper.BarberShopBillingsMapper;
import com.xmj.billing.service.IBarberShopBillingsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 收银Service业务层处理
 *
 * @author ohh
 * @date 2024-04-21
 */
@Service
public class BarberShopBillingsServiceImpl implements IBarberShopBillingsService
{
    @Autowired
    private BarberShopBillingsMapper barberShopBillingsMapper;

    /**
     * 查询收银
     *
     * @param billingID 收银主键
     * @return 收银
     */
    @Override
    public BarberShopBillings selectBarberShopBillingsByBillingID(Long billingID)
    {
        return barberShopBillingsMapper.selectBarberShopBillingsByBillingID(billingID);
    }

    /**
     * 查询收银列表
     *
     * @param barberShopBillings 收银
     * @return 收银
     */
    @Override
    public List<BarberShopBillings> selectBarberShopBillingsList(BarberShopBillings barberShopBillings)
    {
        return barberShopBillingsMapper.selectBarberShopBillingsList(barberShopBillings);
    }

    /**
     * 新增收银
     *
     * @param barberShopBillings 收银
     * @return 结果
     */
    @Override
    public int insertBarberShopBillings(BarberShopBillings barberShopBillings)
    {
        return barberShopBillingsMapper.insertBarberShopBillings(barberShopBillings);
    }

    /**
     * 修改收银
     *
     * @param barberShopBillings 收银
     * @return 结果
     */
    @Override
    public int updateBarberShopBillings(BarberShopBillings barberShopBillings)
    {
        return barberShopBillingsMapper.updateBarberShopBillings(barberShopBillings);
    }

    /**
     * 批量删除收银
     *
     * @param billingIDs 需要删除的收银主键
     * @return 结果
     */
    @Override
    public int deleteBarberShopBillingsByBillingIDs(Long[] billingIDs)
    {
        return barberShopBillingsMapper.deleteBarberShopBillingsByBillingIDs(billingIDs);
    }

    /**
     * 删除收银信息
     *
     * @param billingID 收银主键
     * @return 结果
     */
    @Override
    public int deleteBarberShopBillingsByBillingID(Long billingID)
    {
        return barberShopBillingsMapper.deleteBarberShopBillingsByBillingID(billingID);
    }
}
